//
//  APIManager+Messages.m
//  NoneCar
//
//  Created by DongSen on 2018/7/16.
//  Copyright © 2018年 董森森. All rights reserved.
//

#import "APIManager+Messages.h"

@implementation APIManager (Messages)
- (NSURLSessionDataTask *)PostGetMessagesWithTypes:(NSDictionary*)parmars sucess:(void(^)(NSInteger code, NSDictionary* dict))sucess failure:(void(^)(NSInteger code, NSError *error))failure{
    return [self requestWithMethod:HttpRequestTypePost
                         URLString:GetMessages
                        parameters:parmars
                              done:^(NSURLSessionDataTask *task, id responseObject) {
                                  sucess([self showResponseCode:task],responseObject);
                              } fail:^(NSURLSessionDataTask *task,NSError *error) {
                                  failure([self showResponseCode:task],error);
                              }];
}
@end
